package com.ushine.design.design.b_structural_type.e_facade.b_example;

/**
 * 加密文件 充当子系统
 *
 * @author yls
 */
public class CipherMachine {
    public String encrypt(String plainText) {
        System.out.print("数据加密，将明文加密为密文");
        //加密字符串
        String es = "";
        for (int i = 0; i < plainText.length(); i++) {
            String c = String.valueOf(plainText.charAt(i) % 7);
            es += c;
        }
        System.out.print(es);
        return es;
    }
}
